In semiconductor manufacturing, a wafer can be put on a stage for lithography or inspection. The height of the wafer is an important metrology parameter and can be adjusted for best focus of the incident light or charged beams. The wafer typically has a highly reflective or mirror-like surface. An optical apparatus can image an optical grating onto the surface of the wafer with an incident angle using illumination for height measurement. The reflected light can form an optical grating image. The optical grating image changes when the wafer height changes. The displacement of the optical grating image can be related to the wafer height changes, based on which the wafer height can be measured.
Optical sensors, such as charge-coupled device (CCD) sensors, or complementary metal-oxide semiconductor (CMOS) sensors can be used to generate the optical grating image. The resolution of the height measurement can be limited by the pixel size of the camera, and new solutions for improving the resolution are strived for.